package com.innerclass.anonymous.demo4;

/**
 * 使用匿名类实现工厂
 * 
 * @author Administrator
 * 
 */
public class Test {

	public static void main(String[] args) {
		Service s = ServiceImpl1.factory().getService();
		s.method1();
		s.method2();

		s = ServiceImpl2.factory().getService();
		s.method1();
		s.method2();

		s = ServiceImpl1_1.factory.getService();
		s.method1();
		s.method2();

		s = ServiceImpl2_1.factory.getService();
		s.method1();
		s.method2();
	}

}
